window.employeeAPI = {
    // 获取员工列表
    getEmployees: async (params = {}) => {
        try {
            const response = await apiClient.get('/api/employees/', { params });
            return response;
        } catch (error) {
            console.error('获取员工列表失败:', error);
            throw error;
        }
    },

    // 创建员工
    createEmployee: async (employeeData) => {
        try {
            const response = await apiClient.post('/api/employees/', employeeData);
            return response;
        } catch (error) {
            console.error('创建员工失败:', error);
            throw error;
        }
    },

    // 更新员工信息
    updateEmployee: async (id, employeeData) => {
        try {
            const response = await apiClient.put(`/api/employees/${id}`, employeeData);
            return response;
        } catch (error) {
            console.error('更新员工信息失败:', error);
            throw error;
        }
    },

    // 删除员工
    deleteEmployee: async (id) => {
        try {
            const response = await apiClient.delete(`/api/employees/${id}`);
            return response;
        } catch (error) {
            console.error('删除员工失败:', error);
            throw error;
        }
    },

};
